#include "common/pch.h"

#include "msghandler/msghandler.h"
#include "player/playermgr.h"
#include "cs/cs_message.h"

void MsgHandler::Init()
{
	cs_handler.Register(&player::PlayerMgr::_CMAuthSession);
	cs_handler.Register(&player::PlayerMgr::_CMCharEnum);
	cs_handler.Register(&player::PlayerMgr::_CMPlayerLogin);
}

void MsgHandler::UnInit()
{

}

void MsgHandler::ProcMsg(cftf::net::MsgHdr* hdr)
{
	switch ((HID_e)cs_handler.GetHandlerId(0)) {
	case HID_e::kPlayerMgr:
	{
		cs_handler.Dispatch(&player::PlayerMgr::Instance(), hdr);
		break;
	}
	default:
	{
		break;
	}
	}
}